<!-- HTML header for doxygen 1.8.18-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <meta name="generator" content="Doxygen 1.8.18" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Limit Order Book: LOB Namespace Reference</title>
    <link href="tabs.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="dynsections.js"></script>
    <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
    <link href="html_stylesheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div id="top">
        <!-- do not remove this div, it is closed by doxygen! -->
        <div id="titlearea">
            <table cellspacing="0" cellpadding="0">
                <tbody>
                    <tr style="height: 56px;">
                        <td id="projectalign" style="padding-left: 0.5em;">
                            <div id="projectname">Limit Order Book
                                &#160;<span id="projectnumber">2.0.0</span>
                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">LOB Namespace Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Logic for maintaining a continuous double auction via a limit-order book.  
<a href="namespace_l_o_b.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_l_o_b_1_1_limit.html">Limit</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A price limit containing a FIFO queue of <a class="el" href="struct_l_o_b_1_1_order.html" title="A single order in the LimitOrderBook.">Order</a> objects.  <a href="struct_l_o_b_1_1_limit.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_o_b_1_1_limit_order_book.html">LimitOrderBook</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">An order book for managing <a class="el" href="struct_l_o_b_1_1_limit.html" title="A price limit containing a FIFO queue of Order objects.">Limit</a> / <a class="el" href="struct_l_o_b_1_1_order.html" title="A single order in the LimitOrderBook.">Order</a> objects in a continuous double auction.  <a href="class_l_o_b_1_1_limit_order_book.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_l_o_b_1_1_limit_tree.html">LimitTree</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A single side (buy/sell) of the <a class="el" href="class_l_o_b_1_1_limit_order_book.html" title="An order book for managing Limit / Order objects in a continuous double auction.">LimitOrderBook</a>.  <a href="struct_l_o_b_1_1_limit_tree.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_l_o_b_1_1_order.html">Order</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A single order in the <a class="el" href="class_l_o_b_1_1_limit_order_book.html" title="An order book for managing Limit / Order objects in a continuous double auction.">LimitOrderBook</a>.  <a href="struct_l_o_b_1_1_order.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a55b6f5940501ff6a6f8de06dfc18852c"><td class="memItemLeft" align="right" valign="top"><a id="a55b6f5940501ff6a6f8de06dfc18852c"></a>
typedef std::unordered_map&lt; <a class="el" href="namespace_l_o_b.html#a482ac950a9cb23fdb93c66d6117a8f74">UID</a>, <a class="el" href="struct_l_o_b_1_1_order.html">Order</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_l_o_b.html#a55b6f5940501ff6a6f8de06dfc18852c">UIDOrderMap</a></td></tr>
<tr class="memdesc:a55b6f5940501ff6a6f8de06dfc18852c"><td class="mdescLeft">&#160;</td><td class="mdescRight">a map of order IDs to orders <br /></td></tr>
<tr class="separator:a55b6f5940501ff6a6f8de06dfc18852c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f7f6214768b2e1c81ab886241d2075a"><td class="memItemLeft" align="right" valign="top"><a id="a9f7f6214768b2e1c81ab886241d2075a"></a>
typedef tsl::robin_map&lt; <a class="el" href="namespace_l_o_b.html#a0170482547b909e8a53b5ae42d18e23a">Price</a>, <a class="el" href="struct_l_o_b_1_1_limit.html">Limit</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_l_o_b.html#a9f7f6214768b2e1c81ab886241d2075a">PriceLimitMap</a></td></tr>
<tr class="memdesc:a9f7f6214768b2e1c81ab886241d2075a"><td class="mdescLeft">&#160;</td><td class="mdescRight">a map of prices to limit pointers <br /></td></tr>
<tr class="separator:a9f7f6214768b2e1c81ab886241d2075a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a482ac950a9cb23fdb93c66d6117a8f74"><td class="memItemLeft" align="right" valign="top"><a id="a482ac950a9cb23fdb93c66d6117a8f74"></a>
typedef uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_l_o_b.html#a482ac950a9cb23fdb93c66d6117a8f74">UID</a></td></tr>
<tr class="memdesc:a482ac950a9cb23fdb93c66d6117a8f74"><td class="mdescLeft">&#160;</td><td class="mdescRight">a type for order IDs <br /></td></tr>
<tr class="separator:a482ac950a9cb23fdb93c66d6117a8f74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d5eee8595d35bc6f2b8372e44cd8dd7"><td class="memItemLeft" align="right" valign="top"><a id="a1d5eee8595d35bc6f2b8372e44cd8dd7"></a>
typedef uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_l_o_b.html#a1d5eee8595d35bc6f2b8372e44cd8dd7">Quantity</a></td></tr>
<tr class="memdesc:a1d5eee8595d35bc6f2b8372e44cd8dd7"><td class="mdescLeft">&#160;</td><td class="mdescRight">a type for order quantities <br /></td></tr>
<tr class="separator:a1d5eee8595d35bc6f2b8372e44cd8dd7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0170482547b909e8a53b5ae42d18e23a"><td class="memItemLeft" align="right" valign="top"><a id="a0170482547b909e8a53b5ae42d18e23a"></a>
typedef uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_l_o_b.html#a0170482547b909e8a53b5ae42d18e23a">Price</a></td></tr>
<tr class="memdesc:a0170482547b909e8a53b5ae42d18e23a"><td class="mdescLeft">&#160;</td><td class="mdescRight">a type for order prices <br /></td></tr>
<tr class="separator:a0170482547b909e8a53b5ae42d18e23a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98c8cdadc7da7cd760e1a6dede850854"><td class="memItemLeft" align="right" valign="top"><a id="a98c8cdadc7da7cd760e1a6dede850854"></a>
typedef uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_l_o_b.html#a98c8cdadc7da7cd760e1a6dede850854">Count</a></td></tr>
<tr class="memdesc:a98c8cdadc7da7cd760e1a6dede850854"><td class="mdescLeft">&#160;</td><td class="mdescRight">a type for limit price order counts <br /></td></tr>
<tr class="separator:a98c8cdadc7da7cd760e1a6dede850854"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0860e916768a8e3baaadf73c1a6f9c58"><td class="memItemLeft" align="right" valign="top"><a id="a0860e916768a8e3baaadf73c1a6f9c58"></a>
typedef uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_l_o_b.html#a0860e916768a8e3baaadf73c1a6f9c58">Volume</a></td></tr>
<tr class="memdesc:a0860e916768a8e3baaadf73c1a6f9c58"><td class="mdescLeft">&#160;</td><td class="mdescRight">a type for limit total volume <br /></td></tr>
<tr class="separator:a0860e916768a8e3baaadf73c1a6f9c58"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ac0757a974349160aa795b45451948db6"><td class="memItemLeft" align="right" valign="top"><a id="ac0757a974349160aa795b45451948db6"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_l_o_b.html#ac0757a974349160aa795b45451948db6">Side</a> : bool { <b>Sell</b> = false, 
<b>Buy</b> = true
 }</td></tr>
<tr class="memdesc:ac0757a974349160aa795b45451948db6"><td class="mdescLeft">&#160;</td><td class="mdescRight">the possible sides for the LimitTree <br /></td></tr>
<tr class="separator:ac0757a974349160aa795b45451948db6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a9c1b41f8d06147416dcb43138b2905ae"><td class="memTemplParams" colspan="2">template&lt;Side side&gt; </td></tr>
<tr class="memitem:a9c1b41f8d06147416dcb43138b2905ae"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespace_l_o_b.html#a9c1b41f8d06147416dcb43138b2905ae">set_best</a> (<a class="el" href="struct_l_o_b_1_1_limit.html">Limit</a> **best, <a class="el" href="struct_l_o_b_1_1_limit.html">Limit</a> *limit)</td></tr>
<tr class="memdesc:a9c1b41f8d06147416dcb43138b2905ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the best to the given limit if the given limit is better.  <a href="namespace_l_o_b.html#a9c1b41f8d06147416dcb43138b2905ae">More...</a><br /></td></tr>
<tr class="separator:a9c1b41f8d06147416dcb43138b2905ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a916e380f27d0fd0e1e5f7e9789de786d"><td class="memItemLeft" align="right" valign="top">template&lt;&gt; </td></tr>
<tr class="memitem:a916e380f27d0fd0e1e5f7e9789de786d"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespace_l_o_b.html#a916e380f27d0fd0e1e5f7e9789de786d">set_best&lt; Side::Buy &gt;</a> (<a class="el" href="struct_l_o_b_1_1_limit.html">Limit</a> **highest_buy, <a class="el" href="struct_l_o_b_1_1_limit.html">Limit</a> *limit)</td></tr>
<tr class="memdesc:a916e380f27d0fd0e1e5f7e9789de786d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the best buy to the given limit if the given limit is better.  <a href="namespace_l_o_b.html#a916e380f27d0fd0e1e5f7e9789de786d">More...</a><br /></td></tr>
<tr class="separator:a916e380f27d0fd0e1e5f7e9789de786d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a783b0fcf2c6e50dcb08169b0655cad03"><td class="memItemLeft" align="right" valign="top">template&lt;&gt; </td></tr>
<tr class="memitem:a783b0fcf2c6e50dcb08169b0655cad03"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespace_l_o_b.html#a783b0fcf2c6e50dcb08169b0655cad03">set_best&lt; Side::Sell &gt;</a> (<a class="el" href="struct_l_o_b_1_1_limit.html">Limit</a> **lowest_sell, <a class="el" href="struct_l_o_b_1_1_limit.html">Limit</a> *limit)</td></tr>
<tr class="memdesc:a783b0fcf2c6e50dcb08169b0655cad03"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the best sell to the given limit if the given limit is better.  <a href="namespace_l_o_b.html#a783b0fcf2c6e50dcb08169b0655cad03">More...</a><br /></td></tr>
<tr class="separator:a783b0fcf2c6e50dcb08169b0655cad03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa79f2b39db1864ddad9806d8112dcdcf"><td class="memTemplParams" colspan="2">template&lt;Side side&gt; </td></tr>
<tr class="memitem:aa79f2b39db1864ddad9806d8112dcdcf"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespace_l_o_b.html#aa79f2b39db1864ddad9806d8112dcdcf">find_best</a> (<a class="el" href="struct_l_o_b_1_1_limit.html">Limit</a> **best)</td></tr>
<tr class="memdesc:aa79f2b39db1864ddad9806d8112dcdcf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find the next best when removing the best from the tree.  <a href="namespace_l_o_b.html#aa79f2b39db1864ddad9806d8112dcdcf">More...</a><br /></td></tr>
<tr class="separator:aa79f2b39db1864ddad9806d8112dcdcf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4b24965d7b5b7a42480dd5e2892ba2d"><td class="memItemLeft" align="right" valign="top">template&lt;&gt; </td></tr>
<tr class="memitem:ad4b24965d7b5b7a42480dd5e2892ba2d"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespace_l_o_b.html#ad4b24965d7b5b7a42480dd5e2892ba2d">find_best&lt; Side::Buy &gt;</a> (<a class="el" href="struct_l_o_b_1_1_limit.html">Limit</a> **highest_buy)</td></tr>
<tr class="memdesc:ad4b24965d7b5b7a42480dd5e2892ba2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find the next buy when removing the best buy from the tree.  <a href="namespace_l_o_b.html#ad4b24965d7b5b7a42480dd5e2892ba2d">More...</a><br /></td></tr>
<tr class="separator:ad4b24965d7b5b7a42480dd5e2892ba2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56acc9c82361400b0e22edde3ff80899"><td class="memItemLeft" align="right" valign="top">template&lt;&gt; </td></tr>
<tr class="memitem:a56acc9c82361400b0e22edde3ff80899"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespace_l_o_b.html#a56acc9c82361400b0e22edde3ff80899">find_best&lt; Side::Sell &gt;</a> (<a class="el" href="struct_l_o_b_1_1_limit.html">Limit</a> **lowest_sell)</td></tr>
<tr class="memdesc:a56acc9c82361400b0e22edde3ff80899"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find the next sell when removing the best sell from the tree.  <a href="namespace_l_o_b.html#a56acc9c82361400b0e22edde3ff80899">More...</a><br /></td></tr>
<tr class="separator:a56acc9c82361400b0e22edde3ff80899"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f3af030ab539f0b9e5c5454fda8f8cc"><td class="memTemplParams" colspan="2">template&lt;Side side&gt; </td></tr>
<tr class="memitem:a5f3af030ab539f0b9e5c5454fda8f8cc"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespace_l_o_b.html#a5f3af030ab539f0b9e5c5454fda8f8cc">can_match</a> (<a class="el" href="namespace_l_o_b.html#a0170482547b909e8a53b5ae42d18e23a">Price</a> limit, <a class="el" href="namespace_l_o_b.html#a0170482547b909e8a53b5ae42d18e23a">Price</a> market)</td></tr>
<tr class="memdesc:a5f3af030ab539f0b9e5c5454fda8f8cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return true if the market price can match with the limit price.  <a href="namespace_l_o_b.html#a5f3af030ab539f0b9e5c5454fda8f8cc">More...</a><br /></td></tr>
<tr class="separator:a5f3af030ab539f0b9e5c5454fda8f8cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66cd5b887ab210ff2936b3f14ce3793a"><td class="memItemLeft" align="right" valign="top">template&lt;&gt; </td></tr>
<tr class="memitem:a66cd5b887ab210ff2936b3f14ce3793a"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespace_l_o_b.html#a66cd5b887ab210ff2936b3f14ce3793a">can_match&lt; Side::Buy &gt;</a> (<a class="el" href="namespace_l_o_b.html#a0170482547b909e8a53b5ae42d18e23a">Price</a> limit, <a class="el" href="namespace_l_o_b.html#a0170482547b909e8a53b5ae42d18e23a">Price</a> market)</td></tr>
<tr class="memdesc:a66cd5b887ab210ff2936b3f14ce3793a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return true if the sell market price can match with the buy limit price.  <a href="namespace_l_o_b.html#a66cd5b887ab210ff2936b3f14ce3793a">More...</a><br /></td></tr>
<tr class="separator:a66cd5b887ab210ff2936b3f14ce3793a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ca0dfda7fb5c65ae8b5c238f7146d97"><td class="memItemLeft" align="right" valign="top">template&lt;&gt; </td></tr>
<tr class="memitem:a0ca0dfda7fb5c65ae8b5c238f7146d97"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespace_l_o_b.html#a0ca0dfda7fb5c65ae8b5c238f7146d97">can_match&lt; Side::Sell &gt;</a> (<a class="el" href="namespace_l_o_b.html#a0170482547b909e8a53b5ae42d18e23a">Price</a> limit, <a class="el" href="namespace_l_o_b.html#a0170482547b909e8a53b5ae42d18e23a">Price</a> market)</td></tr>
<tr class="memdesc:a0ca0dfda7fb5c65ae8b5c238f7146d97"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return true if the buy market price can match with the sell limit price.  <a href="namespace_l_o_b.html#a0ca0dfda7fb5c65ae8b5c238f7146d97">More...</a><br /></td></tr>
<tr class="separator:a0ca0dfda7fb5c65ae8b5c238f7146d97"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a794bbaee01ce7b76040cba9ac684edfb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespace_l_o_b.html#ac0757a974349160aa795b45451948db6">Side</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_l_o_b.html#a794bbaee01ce7b76040cba9ac684edfb">operator!</a> (<a class="el" href="namespace_l_o_b.html#ac0757a974349160aa795b45451948db6">Side</a> side)</td></tr>
<tr class="memdesc:a794bbaee01ce7b76040cba9ac684edfb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the opposite side using the invert operator.  <a href="namespace_l_o_b.html#a794bbaee01ce7b76040cba9ac684edfb">More...</a><br /></td></tr>
<tr class="separator:a794bbaee01ce7b76040cba9ac684edfb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Logic for maintaining a continuous double auction via a limit-order book. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a5f3af030ab539f0b9e5c5454fda8f8cc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5f3af030ab539f0b9e5c5454fda8f8cc">&#9670;&nbsp;</a></span>can_match()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;Side side&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool LOB::can_match </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespace_l_o_b.html#a0170482547b909e8a53b5ae42d18e23a">Price</a>&#160;</td>
          <td class="paramname"><em>limit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespace_l_o_b.html#a0170482547b909e8a53b5ae42d18e23a">Price</a>&#160;</td>
          <td class="paramname"><em>market</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return true if the market price can match with the limit price. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">side</td><td>the side of the book to perform the calculation from </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">limit</td><td>the price of the limit order (i.e., the best price) </td></tr>
    <tr><td class="paramname">market</td><td>the price of the opposing side market order to compare </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the market price can match with the limit price </dd></dl>

</div>
</div>
<a id="a66cd5b887ab210ff2936b3f14ce3793a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a66cd5b887ab210ff2936b3f14ce3793a">&#9670;&nbsp;</a></span>can_match&lt; Side::Buy &gt;()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="namespace_l_o_b.html#a5f3af030ab539f0b9e5c5454fda8f8cc">LOB::can_match</a>&lt; Side::Buy &gt; </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespace_l_o_b.html#a0170482547b909e8a53b5ae42d18e23a">Price</a>&#160;</td>
          <td class="paramname"><em>limit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespace_l_o_b.html#a0170482547b909e8a53b5ae42d18e23a">Price</a>&#160;</td>
          <td class="paramname"><em>market</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return true if the sell market price can match with the buy limit price. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">limit</td><td>the price of the buy limit order (i.e., the best price) </td></tr>
    <tr><td class="paramname">market</td><td>the price of the sell side market order to compare </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the sell market price can match with the buy limit price </dd></dl>

</div>
</div>
<a id="a0ca0dfda7fb5c65ae8b5c238f7146d97"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ca0dfda7fb5c65ae8b5c238f7146d97">&#9670;&nbsp;</a></span>can_match&lt; Side::Sell &gt;()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="namespace_l_o_b.html#a5f3af030ab539f0b9e5c5454fda8f8cc">LOB::can_match</a>&lt; Side::Sell &gt; </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespace_l_o_b.html#a0170482547b909e8a53b5ae42d18e23a">Price</a>&#160;</td>
          <td class="paramname"><em>limit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespace_l_o_b.html#a0170482547b909e8a53b5ae42d18e23a">Price</a>&#160;</td>
          <td class="paramname"><em>market</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return true if the buy market price can match with the sell limit price. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">limit</td><td>the price of the sell limit order (i.e., the best price) </td></tr>
    <tr><td class="paramname">market</td><td>the price of the buy side market order to compare </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the buy market price can match with the sell limit price </dd></dl>

</div>
</div>
<a id="aa79f2b39db1864ddad9806d8112dcdcf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa79f2b39db1864ddad9806d8112dcdcf">&#9670;&nbsp;</a></span>find_best()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;Side side&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void LOB::find_best </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_l_o_b_1_1_limit.html">Limit</a> **&#160;</td>
          <td class="paramname"><em>best</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Find the next best when removing the best from the tree. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">side</td><td>the side of the book to perform the calculation from </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">best</td><td>the best limit node </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ad4b24965d7b5b7a42480dd5e2892ba2d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad4b24965d7b5b7a42480dd5e2892ba2d">&#9670;&nbsp;</a></span>find_best&lt; Side::Buy &gt;()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="namespace_l_o_b.html#aa79f2b39db1864ddad9806d8112dcdcf">LOB::find_best</a>&lt; Side::Buy &gt; </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_l_o_b_1_1_limit.html">Limit</a> **&#160;</td>
          <td class="paramname"><em>highest_buy</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Find the next buy when removing the best buy from the tree. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">highest_buy</td><td>the best buy limit node </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a56acc9c82361400b0e22edde3ff80899"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a56acc9c82361400b0e22edde3ff80899">&#9670;&nbsp;</a></span>find_best&lt; Side::Sell &gt;()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="namespace_l_o_b.html#aa79f2b39db1864ddad9806d8112dcdcf">LOB::find_best</a>&lt; Side::Sell &gt; </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_l_o_b_1_1_limit.html">Limit</a> **&#160;</td>
          <td class="paramname"><em>lowest_sell</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Find the next sell when removing the best sell from the tree. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">lowest_sell</td><td>the best sell limit node </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a794bbaee01ce7b76040cba9ac684edfb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a794bbaee01ce7b76040cba9ac684edfb">&#9670;&nbsp;</a></span>operator!()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespace_l_o_b.html#ac0757a974349160aa795b45451948db6">Side</a> LOB::operator! </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespace_l_o_b.html#ac0757a974349160aa795b45451948db6">Side</a>&#160;</td>
          <td class="paramname"><em>side</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the opposite side using the invert operator. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">side</td><td>the side to invert </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the opposite of the given side </dd></dl>

</div>
</div>
<a id="a9c1b41f8d06147416dcb43138b2905ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9c1b41f8d06147416dcb43138b2905ae">&#9670;&nbsp;</a></span>set_best()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;Side side&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void LOB::set_best </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_l_o_b_1_1_limit.html">Limit</a> **&#160;</td>
          <td class="paramname"><em>best</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_l_o_b_1_1_limit.html">Limit</a> *&#160;</td>
          <td class="paramname"><em>limit</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the best to the given limit if the given limit is better. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">side</td><td>the side of the book to perform the calculation from </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">best</td><td>the current best limit </td></tr>
    <tr><td class="paramname">limit</td><td>the limit node to compare to </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a916e380f27d0fd0e1e5f7e9789de786d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a916e380f27d0fd0e1e5f7e9789de786d">&#9670;&nbsp;</a></span>set_best&lt; Side::Buy &gt;()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="namespace_l_o_b.html#a9c1b41f8d06147416dcb43138b2905ae">LOB::set_best</a>&lt; Side::Buy &gt; </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_l_o_b_1_1_limit.html">Limit</a> **&#160;</td>
          <td class="paramname"><em>highest_buy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_l_o_b_1_1_limit.html">Limit</a> *&#160;</td>
          <td class="paramname"><em>limit</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the best buy to the given limit if the given limit is better. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">highest_buy</td><td>the current best buy limit </td></tr>
    <tr><td class="paramname">limit</td><td>the buy limit node to compare to </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a783b0fcf2c6e50dcb08169b0655cad03"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a783b0fcf2c6e50dcb08169b0655cad03">&#9670;&nbsp;</a></span>set_best&lt; Side::Sell &gt;()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="namespace_l_o_b.html#a9c1b41f8d06147416dcb43138b2905ae">LOB::set_best</a>&lt; Side::Sell &gt; </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_l_o_b_1_1_limit.html">Limit</a> **&#160;</td>
          <td class="paramname"><em>lowest_sell</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_l_o_b_1_1_limit.html">Limit</a> *&#160;</td>
          <td class="paramname"><em>limit</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the best sell to the given limit if the given limit is better. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">lowest_sell</td><td>the current best sell limit </td></tr>
    <tr><td class="paramname">limit</td><td>the sell limit node to compare to </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.18-->
<!-- start footer part -->
</body>
</html>
